package wzc.design_pattern.construction.facade;

/**
 * @Author 那和不是个啥
 * @Date 2025/7/20
 * @Description 外观类（Facade）:智能家居控制系统
 */

public class SmartHomeFacade {
    private Light light;
    private TV tv;
    private SoundSystem soundSystem;

    public SmartHomeFacade() {
        this.light = new Light();
        this.tv = new TV();
        this.soundSystem = new SoundSystem();
    }

    public void activateMovieMode() {
        System.out.println("启动电影模式。。。");
        light.turnOff();
        tv.turnOn();
        soundSystem.turnOn();
    }

    public void deactivateMovieMode() {
        System.out.println("关闭电影模式");
        light.turnOn();
        tv.turnOff();
        soundSystem.turnOff();
    }
}
